Method of communicating between control devices of a load control system

ABSTRACT

A load control system for controlling the amount of power delivered to an electrical load from an AC power source includes a load control device and a remote control device. The load control device is operable to control the amount of power delivered to the electrical load in response to control signals transmitted by the remote control device. The remote control device may transmit the control signals to the load control device via current carrier control signals, radio-frequency control signals, or infrared control signals, which may be corrupted by noise during transmission. The received control signals are sampled and filtered by a multi-pass median filter, which substantially eliminates the noise corruption. Specifically, the multi-pass median filter repeatedly examines a set of N sequential samples of the received message signal, determines the median of the N sequential samples, and provides the median as an output sample.

BACKGROUND OF THE INVENTION

1. Related Applications

This application is a continuation-in-part of co-pending commonly-assigned U.S. patent application Ser. No. 11/447,431, filed Jun. 6, 2006, entitled SYSTEM FOR CONTROL OF LIGHTS AND MOTORS, which claims priority from commonly-assigned U.S. Provisional Application Ser. No. 60/687,689, filed Jun. 6, 2005, also entitled SYSTEM FOR CONTROL OF LIGHTS AND MOTORS. The entire disclosures of both applications are hereby incorporated by reference.

2. Field of the Invention

The present invention relates to a method of communicating between control devices of a load control system for controlling the amount of power delivered to an electrical load from an alternating-current (AC) power supply, and more specifically, to a median filter for removing noise from a message signal transmitted by a remote control and received by a load control device.

3. Description of the Related Art

It is often desirable to include a lamp and a fan motor in a single enclosure. Since the lamp and the fan motor are often wired in parallel, the lamp and the fan motor are generally controlled together from a switch located remotely from the lamp and the motor. FIG. 1A shows a prior art light and fan motor control system 10. The system 10 includes a maintained switch 12 coupled between an alternating-current (AC) voltage source 14 and two loads, i.e., a fan motor 16 and a lighting load 18, in an enclosure 19. The fan motor 16 and the lighting load 18 are connected in parallel such that when switch 12 is closed, the fan motor 16 and the lighting load 18 will both be on, and when the switch 12 is open, the fan motor 16 and the lighting load 18 will both be off.

There are also various schemes for independent control of a fan motor as well as a lighting load from a remote location such as a wallstation. FIG. 1B shows a prior art light and fan motor control system 20, having a dual light and fan speed control 22 coupled to the AC voltage source 14. The dual light and fan speed control 22 has two outputs: the first coupled to the fan motor 16 and the second coupled to the lighting load 18, to allow for independent control of the loads. Further, the dual light and fan speed control 22 includes a fan speed circuit for adjusting the speed at which the fan motor 16 turns and a dimmer circuit for changing the intensity of the lighting load 18. The dual light and fan speed control 22 is often mounted in a standard electrical wallbox and includes a user interface to allow a user to separately control the lighting load and the fan motor.

However, the dual light and fan speed control 22 requires two separate wires to be connected between the lamp and the fan motor. If these two connections are not provided between the wallbox and the enclosure containing the lamp and the fan motor, independent control of the lighting load 18 and the fan motor 16 will not be possible. Further, in the control system 20 of FIG. 1B, it is only possible to have one dual light and fan speed control 22, and thus, only one user interface to allow for adjustment of the intensity of the lighting load 18 and the speed of the fan motor 16. Control of the fan motor 16 and lighting load 18 from more than one location is not possible in this system.

FIG. 1C shows a prior art power-line carrier (PLC) control system 30. Power-line carrier control systems use the power system wiring to transmit control signals at high frequencies (i.e., much greater than the line frequency of 50 Hz or 60 Hz). All devices of the PLC system 30 are coupled across an AC power source 32 (from hot to neutral) to receive both power and communications from the same wiring. The system 30 includes a PLC fan motor controller 34 coupled to a fan motor 36, a PLC light controller 38 coupled to a lighting load 40, and a remote control keypad 42. The remote control keypad 42 is operable to transmit a message across the power line to the PLC fan motor controller 34 and the PLC light controller 38 to control the respective loads. One example of a communication protocol for home automation using power-line carrier technology is the industry standard X10. The X10 protocol uses a voltage carrier technique to transmit messages between devices connected to the power system. Through the voltage carrier technology, the messages are transmitted on voltages signals referenced either between the hot and neutral connections of the AC power source 32 or between the hot connection of the AC power source and an earth ground connection. The devices in an X10 system communicate using house addresses and unit addresses.

However, existing power-line carrier systems have some limitations. For example, all devices in a PLC system require a neutral connection. Also, since the X10 protocol utilizes voltage carrier technology, communication messages are transmitted throughout the power system and it is difficult to isolate the communication signals from other devices connected to the power system. Finally, the X10 protocol is not a “reliable” communication scheme since no acknowledgements are sent to a transmitting device when a receiving device has received a valid message.

Thus, it is desirable to provide a reliable means to independently control from a remote location a fan motor and a lighting load that are located in the same enclosure. Since a consumer may wish to locate the fan motor and the attached lamp in a position previously occupied by only a lamp controlled by a standard single-pole single-throw (SPST) wall switch, it is desirable to be able to control a fan motor as well as an attached lamp independently, using a two-wire control device. A two-wire device is a control device that has only two electrical connections, i.e., one for the AC source voltage and one for the fan/lamp, and does not have a neutral line connection. As shown in FIG. 1A, this kind of system typically only includes the switch 12 in series electrical connection between the AC source 14 and the loads, and no neutral connection is available in the electrical wallbox where the switch is housed. Since it is desirable to control the fan motor 16 and the lighting load 18 independently, using the existing building wiring, it is necessary to develop a means to allow independent control over the existing building wiring consisting of a single wire connecting the wall control, i.e., the dual light and fan speed control 22, to the enclosure of the fan motor 16 and the lighting load 18.

Prior art systems to accomplish this are known which provide a coding/communication scheme to independently control the fan motor and the lamp. However, many of these systems are unreliable, provide erratic, noisy operation, and require a neutral connection. It is desirable to provide a simple, reliable communication scheme for independently controlling the fan motor and lamp without a neutral connection.

SUMMARY OF THE INVENTION

The present invention provides a method of communicating a message signal from a first control device to a second control device. The method comprises the steps of: (1) transmitting the message signal from the first control device; (2) receiving the message signal at the second control device; (3) sampling the received message signal; (4) producing a set of N sequential samples; (5) determining the median of the N sequential samples; (6) providing the median as an output sample; and (7) repeating the steps of sampling the received message signal, examining the set of N sequential samples, determining the median, and providing the median.

According to another aspect of the present invention, a method of filtering a received message signal having a sequence of samples comprises the steps of: (1) examining a set of N sequential samples of the received message signal; (2) determining the median of the N sequential samples; (3) providing the median as an output sample; and (4) repeating the steps of examining a set of N sequential samples, determining the median, and providing the median.

In addition, the present invention provides a control device for use in a load control system for controlling the amount of power delivered to an electrical load from an AC power source. The control device comprises a receiver operable to receive a message signal, and a controller coupled to the receiver. The controller is operable to sample the received message signal to produce a sampled signal, execute a median filter on the sampled signal to produce a median-filtered output signal, and process the median-filtered output signal.

The present invention further provides a load control system for controlling the amount of power delivered to an electrical load from an AC power source. The control device comprises first and second control devices. The first control device includes a transmitter operable to transmit a message signal. The second control device includes a receiver operable to receive a message signal and a controller coupled to the receiver. The controller is operable to sample the received message signal to produce a sampled signal, execute a median filter on the sampled signal to produce a median-filtered output signal, and process the median-filtered output signal.

Other features and advantages of the present invention will become apparent from the following description of the invention, which refers to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be describe in greater detail in the following detailed description with reference to the drawings in which:

FIG. 1A is a simplified block diagram of a prior art electric light and electric motor control system;

FIG. 1B is a simplified block diagram of a prior art electric light and electric motor control system including a dual light and motor speed control;

FIG. 1C is a simplified block diagram of a prior art power-line carrier control system for controlling an electric motor and an electric light;

FIG. 2 is a simplified block diagram of a system for control of electric lights and electric motors according to the present invention;

FIG. 3 is a simplified block diagram of a wallstation of the system of FIG. 2;

FIG. 4 is a simplified block diagram of a light/motor control of the system of FIG. 2;

FIG. 5A shows a first example of the system of FIG. 2 demonstrating the current loop used for communication between the wallstations and the light/motor control unit;

FIG. 5B shows a second example of a system for independent control of a lighting load and a motor load to demonstrate an optimal communication loop current;

FIG. 5C is a simplified block diagram of a system for control of a plurality of loads according to another embodiment of the present invention;

FIG. 6A shows example waveforms of the system of FIG. 2;

FIG. 6B shows the parts of a transmitted message of the system of FIG. 2;

FIG. 7 shows a simplified block diagram of a communication circuit of the system of FIG. 2;

FIG. 8 shows a simplified flowchart of the process of a receiver routine implemented in a controller of the system of FIG. 2;

FIGS. 9A, 9B, and 9C show waveforms that demonstrate the operation of a median filter of the receiver routine of FIG. 8;

FIG. 9D is a simplified flowchart of a single-pass median filter according to a first embodiment of the present invention;

FIG. 9E is a simplified flowchart of a single-pass median filter according to a second embodiment of the present invention;

FIG. 9F is a simplified flowchart of a single-pass median filter according to a third embodiment of the present invention;

FIG. 9G is a diagram of a lookup table used by the single-pass median filter of FIG. 9F;

FIGS. 10A and 10B show a simplified flowchart of an automatic addressing algorithm of the system of FIG. 2;

FIG. 11 is a simple diagram of a radio-frequency (RF) lighting control system according to the present invention;

FIG. 12A is a simplified block diagram of the dimmer switch of the RF lighting control system of FIG. 11;

FIG. 12B is a simplified block diagram of the remote control of the RF lighting control system of FIG. 11;

FIG. 13 is a flowchart of a button procedure executed by the controller of the remote control of FIG. 12B;

FIG. 14 is a flowchart of an RF signal procedure executed by the controller of the dimmer switch of FIG. 12A;

FIG. 15 is a simplified block diagram of a test setup using to measure the conducted RF sensitivity of the dimmer switch of FIG. 12A; and

FIG. 16 is a simplified block diagram of an infrared (IR) lighting control system according to the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS OF THE INVENTION

The foregoing summary, as well as the following detailed description of the preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purposes of illustrating the invention, there is shown in the drawings an embodiment that is presently preferred, in which like numerals represent similar parts throughout the several views of the drawings, it being understood, however, that the invention is not limited to the specific methods and instrumentalities disclosed.

As is well known, a lamp and a fan motor are typically packaged in the same housing. It is desirable to be able to control the lamp and fan motor independently from the same remote location, by, for example, a wallstation. However, the two circuits to control the lamp and the fan motor are typically different. The lamp may be controlled by a series switch, typically a phase-angle dimmer. The fan motor may be controlled by a shunt switch in parallel with the fan motor, such as is disclosed in co-pending commonly-assigned U.S. patent application Ser. No. 11/447,728, filed on Jun. 6, 2006, entitled METHOD AND APPARATUS FOR QUIET VARIABLE MOTOR SPEED CONTROL, the entire disclosure of which is hereby incorporated by reference.

A block diagram of a system 100 for independent control of lights and fan motors according to the present invention is shown in FIG. 2. The system includes a plurality of wallstations 104 that are connected in series between an AC voltage source 102 and a light/motor control unit 105 over the electrical power wiring of a building to form a power loop. The light/motor control unit 105 is operable to control both the speed of a fan motor 106 and the intensity of a lighting load 108. The fan motor 106 and the lighting load 108 are preferably both mounted in a single enclosure 109 (sometimes referred to as the “canopy”).

In the system 100 of FIG. 2, it is desirable to provide substantially the full AC voltage from the AC voltage source 102 to the light/motor control unit 105 for operation of the fan motor 106 and the lighting load 108. Since the wallstations 104 are in series electrical connection, it is desirable to minimize the voltage drop across each wallstation 104. Thus, it is not desirable to develop a significant voltage across each of the wallstations 104 in order to charge an internal power supply to power the low-voltage circuitry of the wallstation.

A simplified block diagram of the wallstation 104 is shown in FIG. 3. A power supply 110 is provided in series between a first electrical terminal H1 and a second electrical terminal H2. The power supply 110 provides a DC voltage, V_(CC), to power a controller 112 and a communication circuit 116, i.e., a transceiver. The operation of the power supply 110 is described in greater detail in co-pending commonly-assigned U.S. patent application Ser. No. 11/447,489, filed Jun. 6, 2006, entitled POWER SUPPLY FOR A LOAD CONTROL DEVICE, the entire disclosure of which is hereby incorporated by reference.

The controller 112 is preferably implemented as a microcontroller, but may be any suitable processing device, such as a programmable logic device (PLD), a microprocessor, or an application specific integrated circuit (ASIC). A user interface 114 includes a plurality of buttons for receiving inputs from a user and a plurality of light emitting diodes (LEDs) for providing visual feedback to the user. The controller 112 accepts control inputs from the buttons of the user interface 114 and controls the operation of the LEDs. The operation of the LEDs is described in greater detail in co-pending commonly-assigned U.S. patent application Ser. No. 11/191,780, filed Jul. 28, 2005, entitled APPARATUS AND METHOD FOR DISPLAYING OPERATING CHARACTERISTICS ON STATUS INDICATORS, the entire disclosure of which is hereby incorporated by reference.

The controller 112 is coupled to the communication circuit 116 for transmitting and receiving control information to and from the light/motor control unit 105 and the other wallstations 104 of system 100. The communication circuit 116 transmits and receives the control information via a communication transformer 118 over the electrical power wiring coupled from the AC voltage source 102 to the wallstations 104 and the light/motor control unit 105. The communication transformer 118 has a primary winding 11 8A that is connected in series electrical connection with the terminals H1, H2 of the wallstation 104 and a secondary winding 118B that is coupled to the communication circuit 116.

The wallstation 104 further includes an air-gap switch 117 in series with the power supply 110. When the air-gap switch 117 is opened, power is removed from all devices of the system 100 since the devices are coupled in a power loop. To provide safety when servicing the loads, i.e., changing a light bulb canopy, the wallstations 104 are preferably coupled to the hot line of the electrical power wiring such that the hot line is not provided in the canopy when the air-gap switch 117 is open. However, the wallstations 104 may also be coupled to the neutral line.

A simplified block diagram of the light/motor control unit 105 is shown in FIG. 4. The light/motor control unit 105 includes a HOT terminal H, a neutral terminal N, a dimmed hot terminal DH connected to the lighting load 108, and a fan motor hot terminal MH connected to the fan motor 106. The light/motor control unit 105 includes a dimmer circuit 150 for controlling the intensity of the lighting load 108 and a fan motor control circuit 152 for controlling the rotational speed of the fan motor 106. The dimmer circuit 150 utilizes a semiconductor switch (not shown) to control the amount of current conducted to the lighting load 108 and thus the intensity of the lighting load. The conduction time of the semiconductor switch is controlled by a controller 154 using standard phase-control dimming techniques as is well known in the art.

A motor voltage detect circuit 156 determines the zero-crossings of the motor voltage across the fan motor 106 and provides a control signal to the controller 154, which operates the fan motor control circuit 152 accordingly. A zero-crossing of the motor voltage is defined as the time at which the motor voltage transitions from positive to negative polarity, or from negative to positive polarity, at the beginning of each half-cycle of the motor voltage. The operation of the fan motor control circuit 152 with the motor voltage detect circuit 156 is described in greater detail in previously-mentioned U.S. patent application Ser. No. 11/447,728.

The controller 154 is coupled to a communication circuit 158 (i.e., a transceiver), which transmits and receives control information over the electrical power wiring via a communication transformer 160. The communication transformer 160 is a current transformer that has a primary winding 160A that is connected in series with a hot terminal H of the motor/light control unit 105 and a secondary winding 160B that is coupled to the communication circuit 158.

A power supply 162 is coupled to the load-side of the communication transformer 160 and generates a DC voltage V_(CC) to power the controller 154 and the other low-voltage circuitry. Two diodes 164A, 164B are provided such that the power supply is operable to charge only during the positive half cycles. The power supply 162 preferably comprises a capacitor (not shown) having a capacitance of approximately 680 μF. A capacitor 165 is coupled between the cathode of the diode 164A and the neutral terminal N and preferably has a capacitance of 2.2 μF.

A capacitor 166 is connected in parallel with the power supply 162 between the load-side of the communication transformer 160 and the cathode of the diode 164A. The capacitor 166 completes a communication loop with the wallstations 104 and isolates the communication transformer 160 from the high impedance of the fan motor 106, particularly when the fan motor 106 is off. The capacitor 166 is sized to pass the loop current carrier signal modulated with the control information, while blocking the 50/60 cycle power of the AC voltage source 102. A preferred value for the capacitor 161 is 10 nF.

A zero-cross detect circuit 168 is coupled between the load-side of the communication transformer 160 and the neutral terminal N for providing a signal representative of the zero-crossings of the AC voltage source 102 to the controller 154. A zero-crossing of the AC voltage is defined as the time at which the AC voltage transitions from positive to negative polarity, or from negative to positive polarity, at the beginning of each half-cycle of the AC voltage source 102. The controller 154 determines when to turn on or off the semiconductor switch of the dimmer circuit 150 each half-cycle by timing from each zero-crossing of the AC supply voltage.

The control system 100 preferably uses a current-carrier technique to communicate between the wallstations 104 and the light/motor control unit 105. FIG. 5A shows a first example of the system 100 for independent control of a lighting load 108 and a fan motor 106 demonstrating a communication loop current 172 used for communication between the wallstations 104 and the light/motor control unit 105. The load currents for powering the lighting load 108 and the fan motor 106 flow through the primary winding 11 8A of the communication transformer 118 of the wallstation 104 and the primary winding 160A of the communication transformer 160 of the light/motor control unit 105. Since the AC voltage source 102, the wallstation 104, and the light/motor control unit 105 are all located in different locations, a portion of building electrical power wiring 170 exists between the system components. The communication loop current 172 flows through the AC voltage source 102, the communication transformer 118 of the wallstation 104, the communication transformer 160, and the capacitors 165, 166 of the light/motor control unit 105. The capacitor 161 completes the communication loop and isolates the communication loop from the fan motor 106. The isolation is needed because the fan motor provides a high impedance when the fan motor 106 is off and the inductive nature of the fan motor attenuates the communication loop current 172.

After the controller 112 has received user-actuated control information from the actuator buttons of the user interface 114 (FIG. 3), the communication circuit 116 transmits a communication message from the controller via the communication transformer 118, which couples the control information onto the hot line. Since the same current flows through the primary winding 11 8A of the transformer 118 in the wallstation and the primary winding 160A of the transformer 160 in the light/motor control unit 105, the communication loop current 172 induces an output message on the secondary 160B of transformer 160. The output message is received by the communication circuit 158 of the light/motor control unit 10s and is then provided to the controller 154 to control the fan motor control circuit 152 and the dimmer circuit 150.

FIG. 5B shows an example of a second system 180 for independent control of a lighting load 108 and a fan motor 106 demonstrating an optimal communication loop current 182 that does not flow through the AC voltage source 102, the fan motor 106, or the lighting load 108. Note that in this configuration, the hot side of the AC voltage source 102 is provided at the canopy, i.e., at the mounting enclosure 109 (FIG. 2) of the fan motor 106 and the lighting load 108. The system 180 includes a light/motor control unit 184 that comprises an additional communication terminal C and a capacitor 186 coupled between the terminal C and the neutral terminal N. In the layout of system 180, the terminal C is connected to the hot side of the AC voltage source 102 to complete the communication loop through the capacitor 186 such that the communication loop current 182 does not flow through the AC voltage source 102. The capacitor 186 is provided to terminate the communication loop and thereby prevent data being transferred between the wallstation 104 and the light/motor control unit 184 from entering the power system. The capacitor 186 is sized to pass the loop current carrier signal containing the control information, while blocking the 50/60 cycle power of the AC voltage source. A preferred value for the capacitor 186 is 10 nF.

FIG. 5C is a simplified block diagram of a system 188 for control of a plurality of loads according to another embodiment of the present invention. Three light/motor control units 105 are coupled in parallel electrical connection. Each of the light/motor control units 105 is coupled to a fan motor (not shown) and/or a lighting load (not shown). A communication loop current 189 flows through the wallstations 104 and communication currents 189A, 189B, 189C flow through each of the light/motor control units 105. The communication currents 189A, 189B, 189C each have a magnitude equal to approximately one-third of the magnitude of the communication current 189. Each of the wallstations 104 is operable to control all of the fan motors in unison and all of the lighting loads in unison. Power is removed from the all of the wallstations 104 and the light/motor control units 105 on the communication loop if the air-gap switch 117 of any of the wallstations 104 is opened.

The message information may be modulated onto the hot line by any suitable modulation means, for example, amplitude modulation (AM), frequency modulation (FM), frequency shift keying (FSK), or binary phase shift keying (BPSK). FIG. 6A shows examples of the transmitted and received signals of the control system 100. A transmitted message signal 190 is provided, for example, by the controller 112 to the communication circuit 116 of the wallstation 104. The transmitted message signal 190 is modulated onto a carrier, e.g., frequency-modulated onto the carrier, by the communication circuit 116 to produce a modulated signal 191. During transmission, the modulated signal 191 is susceptible to noise and thus a noisy modulated signal 192 (which includes some noise 192A) is received, for example, by the communication circuit 158 of the light/motor control unit 105. Accordingly, the communication circuit 158 provides a noisy demodulated message 193 to the controller 154 of the light/motor control unit 105. In order to avoid generating a noisy demodulated message 193 and to obtain a desired received message 194, a suitable means for modulation, demodulation, and filtering is provided according to the invention (as will be described in greater detail below).

According to FIG. 6B, a transmitted message signal 190 has three components: a preamble 196, a synchronization code 197, and the message code 198. The preamble 196 is a code that is k bits in length and is used to coordinate the demodulation and the decoding of a received message. The synchronization code 197 is an orthogonal pseudo random code with low cross-correlation properties that is n bits in length and that all devices in the loop of the system 100 try to detect in real time. The synchronization code also serves the purpose of an address. The presence of this code indicates that a message is contained in the message code 198 that follows. Finally, the message code 198 is a forward error correction code that is m bits in length that is received following the synchronization code. This bit stream is not decoded in real time but is passed to a message parser.

FIG. 7 shows a simplified block diagram of the communication circuit 158 of the motor/light control unit 105. The communication circuit 158 is coupled to the transformer 160, which operates along with a capacitor 202 as a tuned filter to pass substantially only signals at substantially the transmission frequency of the modulated signals 192, i.e., between 200 kHz and 300 kHz. The voltage across the capacitor 202 is provided to a voltage clamp 204 to protect against high voltage transients. A demodulator 206 receives the modulated message signal 192 and generates the demodulated received message signal 193 using standard demodulation techniques that are well-known in the art. The demodulated message signal 193 is provided to a receiver routine 208 of the controller 154 that will be described in more detail with reference to FIG. 8.

FIG. 7 also shows the transmitter portion of the communication circuit 158. The controller 154 implements a code generator 210 that produces the synchronization code 197 and the message code 198 of the transmitted message 190. Alternatively, the controller 154 could use a look-up table to generate the synchronization code 197 and the message code 198 based on the desired information to be transmitted for controlling the fan motor 106 and the lighting load 108.

In a preferred embodiment, the coded signal is thereafter encoded at a Manchester encoder 212. With Manchester encoding, a bit of data is signified by a transition from a high state to a low state, or vice versa, to represent a logic-zero bit or a logic-one bit, respectively, as is well known in the art. Although Manchester encoding is shown, other digital encoding schemes could be employed. The encoded signal is then modulated on a carrier signal by a modulator 214 using, for example, AM, FM, or BPSK modulation. After amplification by a power amplifier 218, the modulated signal is coupled to the tuned filter (comprising the capacitor 202 and the transformer 160) and is transmitted on to the hot line as a current signal. While the communication circuit 158 of the motor/light control unit 105 is described above and shown in FIG. 7, the communication circuit 116 of the wallstation 104 has the same implementation.

FIG. 8 shows a simplified block diagram of the process of the receiver routine 208 implemented in the controller 154. The demodulated signal 193 (i.e. the input to the receiver routine 208) is first sampled by the controller 154 and stored in memory at step 219. In the discussion of the receiver routine 208, a sample of the demodulated signal 193 in the high state is considered a value of one (1) and a sample of the demodulated signal 193 in the low state is considered a value of zero (0). The sampled data is then filtered by a pipelined multi-pass median filter 220. FIGS. 9A, 9B, and 9C show waveforms that demonstrate the operation of the multi-pass median filter 220. FIG. 9A shows an example of an original Manchester encoded stream 250, i.e., as generated by the Manchester encoder 212 of the controller 154 before transmission.

The original Manchester encoded stream 250 may be corrupted by noise during transmission such that a noisy Manchester encoded stream 252 shown in FIG. 9B (having noise impulses 252A) is provided to the controller of the receiving device. The transmitted current-carrier signals are much smaller in amplitude (approximately 5 mA) in comparison to the amplitude of the current used by the lighting load 108 and the fan motor 106 (approximately 5 A). Since the semiconductor switch of the dimmer circuit 150 controls the power delivered to the lighting load 108 using phase-control dimming, large current pulses through the lighting load 108 are induced in the communication transformers 118, 160. These large current pulses corrupt the modulated signal 191 and are detected as binary impulse noise in the demodulated bit stream. This is shown in the noisy Manchester encoded stream 252 by the plurality of noise impulses 252A that are not in the original Manchester encoded stream 250.

Most types of interference only cause momentary excursions across the detection threshold. The resulting signal is much like digital shot noise and statistically is similar to the “random telegrapher's waveform”. As such, it is very impulsive in nature and can be modeled to a first order as a Poisson point process.

The multi-pass median filter 220 is used to substantially eliminate the noise corruption to generate the filtered Manchester encoded stream 254 shown in FIG. 9C. The median filter 220 is ideally suited to filtering a binary stream such as the noisy Manchester encoded stream 252 shown in FIG. 9B. The median filter examines a sliding window of samples of the noisy Manchester encoded stream 252. A median filter of order M has a sliding window of width, N samples, defined by N=2·M+1.   (Equation 1) Accordingly, the multi-pass median filter 220 examines N samples of the noisy Manchester encoded stream 252 at a time. For a 3^(rd) order median filter, seven samples are examined since N _((M=3))=2·M+1=7.   (Equation 2) Each time the controller samples the noisy Manchester encoded stream 252 at step 219 and executes the multi-pass median filter 220, the window of the multi-pass median filter shifts by one sample, such that the multi-pass median filter examines a new set of N sequential samples.

The multi-pass median filter 220 preserves any “root signal” passing through the window. A root signal is defined as any signal that has a constant region M+1 points or greater with monotonic increasing or decreasing boundaries. By definition, root signals cannot contain any impulses or oscillations, i.e., signals with a width less than M+1. When a corrupted binary signal is passed through the median filter, the filter removes the impulses in the regions where the signal should be a binary zero or binary one.

The multi-pass median filter 220 repeatedly executes a single-pass median filter 220A, which is shown in FIG. 9D. The single-pass median filter 220A receives an input sample 264 and generates an output sample 274. Preferably, the multi-pass median filter 220 executes the single-pass median filter 220A twice per sample of the noisy Manchester encoded stream 252. Alternatively, the multi-pass median filter 220 could execute the single-pass median filter 220A more than two times per input sample.

Specifically, the single-pass median filter 220A is executed a first time on the noisy Manchester encoded stream 252, which is sampled in step 219 of the receiver routine 208. The newest sample of the noisy Manchester encoded stream 252 is added to an initial pipeline (or sequence) of sampled data, i.e., a sampled signal. Accordingly, the newest sample of the Manchester encoded stream 252 is provided as the input sample 264 for the first execution of the single-pass median filter 220A. The single-pass median filter 220A is then executed a first time on N sequential samples of the initial pipeline of samples. The output sample of the first execution of the single-pass median filter 220A is added to the end of a first filtered-sample pipeline, i.e., a first sequence of filtered samples.

Then, the single-pass median filter 220A is executed a second time on N sequential samples of the first filtered-sample pipeline. In other words, the output sample 274 (of the first execution of the single-pass median filter 220A) is provided as the input sample 264 for the second execution of the single-pass median filter. The output sample 274 of the second execution of the single-pass median filter 220A is provided to the end of a second filtered-sample pipeline, which is the median-filtered output signal of the multi-pass median filter 220.

FIG. 9D is a simplified flowchart of a single-pass median filter 220A according to a first embodiment of the present invention. Each execution, the single-pass median filter 220A examines the set of N sequential samples currently in the window of the median filter, which may comprise samples the initial pipeline, i.e., the noisy Manchester encoded stream 252, or samples of the first filtered-sample pipeline. First, the median filter discards the N^(th) sample of the previous N samples at step 260. Next, the single-pass median filter 220A shifts the samples up at step 262 leaving the first sample of the N samples empty and available to receive a new sample. For example, if the present N samples are

-   -   0 1 1 0 0 1 1,         the single-pass median filter 220A drops the Nth sample, i.e.,         7^(th) sample, and shifts the samples to the right to form the         sequence     -   x 0 1 1 0 0 1,         where x represents the first sample, which is available to         receive the new sample. The single-pass median filter 220A then         receives the new input sample 264 and shifts the sample into the         first position of the sequence of N samples at step 266. If the         new input sample 264 is one (1) in the above example, the         resulting new set of N sequential samples is     -   1 0 1 1 0 0 1.         The new input sample 264 comprises the next sample from the         noisy Manchester encoded stream 252 the first time the         single-pass median filter 220A is executed. The second timer the         single-pass median filter 220A is executed, the new input sample         264 comprises the output sample 272 from the first execution of         the single-pass median filter 220A.

Next, the single-pass median filter 220A determines the median of the present N sequential samples of the sliding window. According to a first embodiment of the present invention (as shown in FIG. 9D), the single-pass median filter 220A groups (i.e., orders) the ones and zeros of the N samples at step 268 and chooses the middle sample as the median at step 270. For example, if the present N samples are

-   -   1 0 1 1 0 0 1,         the median filter 220A groups the zeros and the ones at step 286         to form a sorted sample stream     -   0 0 0 1 1 1 1.         Since the middle value of the sorted sample stream is one, the         median of the present N sequential samples of the sliding window         is one at step 270. As step 272, the single-pass median filter         220A provides the chosen median as the output sample 274.

Thus, the multi-pass median filter 220 provides the output sample 272 of the second execution of the single-pass median filter 220A to generate the median-filtered output signal, i.e., the filtered Manchester encoded stream 254 shown in FIG. 9C. The multi-pass median filter 220 removes the noise impulses 252A from the corrupted Manchester encoded stream 252. As a result of the filtering, the rising and falling edges of the filtered Manchester encoded stream 254 may occur at different times than the rising and falling edges of the original Manchester encoded stream 250. Since the data is encoded in the Manchester encoded stream 250 by generating a rising edge or falling edge during a predetermined period of time, it is not critical exactly when the rising and falling edges occur in the filtered Manchester encoded stream 254 at the time of decoding. It is only important that incorrect rising and falling edges are removed from encoded stream.

FIG. 9E is a simplified flowchart of a single-pass median filter 220B according a second embodiment of the present invention. In the second embodiment, the median filter 220B counts the number of ones in the present N sequential samples of the sliding window to determine the median at step 280. For an M^(th) order median filter 220B, if the count of the ones is greater than or equal to the value of M+1=(N+1)/2,   (Equation 3) at step 282, the median is one is at step 284. Otherwise, the median is zero at step 286. Thus, for a 3^(rd) order median filter 220B, if there are four ones in the N samples, the median is equal to one. Accordingly, the width W of the median filter 220B must always be an odd number, i.e., 2M+1.

FIG. 9F is a simplified flowchart of a single-pass median filter 220C according a third embodiment of the present invention. The median filter 220C uses a lookup table 292 (as shown in FIG. 9G) to determine the median of the N samples at step 290. Specifically, the indexes of the lookup table include each possible combination of the N sequential samples and corresponding median values associated with each of the indexes. Accordingly, the lookup table has 2⁷ (i.e., 128) entries. By using the lookup table, the controller 154 is able to complete the median filter 220C in a few instruction cycles thereby making the computation on a microcontroller exceptionally fast.

After passing through the multi-pass median filter 220, the median-filtered output signal passes through a Manchester decoder 222 to produce a digital bit stream from the Manchester-encoded bit stream that is received. The decoded signal and a pseudo random orthogonal synchronization code 224 are fed to a cross correlator 226. The output of the cross correlator 226 is integrated by an integrator 228 and provided to a threshold detector 230. This processing occurs in real time with the output of the receiver routine 208 updated at the bit rate of the sequence.

At the cross correlator 226, the bit stream from the Manchester decoder 222 and the pseudo random orthogonal synchronization code 224 are input to an exclusive NOR (XNOR) logic gate. The number of ones in the output of the XNOR gate is counted to perform the integration at the integrator 228. A lookup table is utilized to count the ones during the integration. Since the codes are orthogonal, the correlation is small unless the codes match. The match does not have to be exact, merely close, for example a 75% match.

If the synchronization code is detected at step 232, the next M decoded bits (i.e., the message code 198) from the Manchester decoder 222 are saved at step 234. The forward error correction message codes 236 are then compared to the M decoded bits to find the best match, which determines the command at step 238 and the command is executed at step 240. This step is known as maximum likelihood decoding and is well known in the art. At step 232, if the synchronization code is not detected, the data is discarded and the process exits.

After receiving a decoded message, the controller transmits an acknowledgement (ACK) to the device that transmitted the received message. Transmitting the ACK allows for a reliable communication scheme.

The devices of the system 100 for independent control of lights and fan motors all communicate using a system address. In order to establish a system address to use, the wallstations 104 and the light/motor control unit 105 execute an automatic addressing algorithm upon power up. FIGS. 10A and 10B show a simplified flowchart of the automatic addressing algorithm.

Since the devices of system 100 are connected in a loop topology, it is possible to cause all devices to power up at one time by toggling (i.e., opening, then closing) the air-gap switch 117 of one of the wallstations 104. Upon power-up at step 300, the devices in the system 100 enters an addressing mode at step 302, meaning that the device is eligible to participate in the addressing algorithm and communicates with other devices of the system using a broadcast system address 0. In addressing mode, devices use a random back-off time when transmitting to minimize the probability of a collision since there could be many unaddressed devices in the system. After a suitable timeout period, e.g., 20 seconds, the devices leave the addressing mode.

First, the present device determines if all of the devices in the system have a system address at step 304. Specifically, upon power-up, all devices that do not have a system address transmit an address initiation request. At step 304, the device waits for a predetermined amount of time to determine if any address initiation requests are transmitted. If the device determines that all devices in the system have the system address at step 304, the device transmits the system address to all devices at step 306.

If all devices in the system do not have a system address at step 304, the present device transmits a query message to each device at step 308. The devices of the system respond to the query message by transmitting the system address and their device type, (i.e., a wallstation 104 or a light/motor control unit 105). At step 310, the present device determines if the system 100 is a “valid” system. A valid system includes at least one wallstation 104 and at least one light/motor control unit 105 and does not have more than one system address, i.e., no two devices of the system have differing system addresses. If the system is a valid system at step 310, the present device then determines if any of the devices of the system 100 have a system address at step 312. If at least one device has a system address, the present device saves the received address as the system address at step 314 and transmits the received address at step 316.

If the no devices have a system address at step 312, the present device attempts to select a new system address. At step 318, the device chooses a random address M, i.e., a random selection from the allowable address choices, as the system address candidate. For example, there may be 15 possible system addresses, i.e., 1-15. Since there may be neighboring systems already having address M assigned, the device transmits a “ping”, i.e., a query message, using address M at step 320 to verify the availability of the address. If any devices respond to the ping, i.e., the address M is already assigned, at step 322, the device begins to step through all of the available system addresses. If all available system addresses have not been attempted at step 324, the device selects the next available address (e.g., by incrementing the system address candidate) at step 326, and transmits another ping at step 320. Otherwise, the process simply exits. Once a suitable address M has been verified as being available, i.e., no devices respond at step 322, the present device sets the system address candidate as the system address at step 328, and transmits address M on the broadcast channel 0 at step 316. Accordingly, all unaddressed devices in addressing mode then save address M as the system address. The process then exits.

If the system 100 is not a valid system at step 310, then all system devices that presently have the system address exit the addressing mode at step 330. If the addressing assignment has only been attempted once at step 332, then the device transmits another query message at step 308. Otherwise, the process simply exits.

As a recovery method, an address reset is included that re-addresses all devices in the system 100. After power-up, i.e., when all the devices in the system are in addressing mode, a special key sequence may be entered by a user at the user interface 114 of the wallstation 104. Upon receipt of this input from the user interface 114, the controller 112 of the wallstation 104 transmits a message signal containing a “reset address” command over the power wiring to all devices. When a device in the addressing mode receives the reset address command, the device sets itself to the unaddressed state, i.e., the device is only responsive to messages transmitted with the broadcast system address 0 while in the addressing mode. The address assignment algorithm then proceeds as if all devices in the system 100 do not have a system address.

FIG. 11 is a simple diagram of a radio-frequency (RF) lighting control system 400 according to the present invention. The lighting control system 400 comprises a remotely-controllable load control device, i.e., a dimmer switch 410, and a remote control 420. Preferably, the dimmer switch 410 is adapted to be wall-mounted in a standard electrical wallbox. The dimmer switch 410 is operable to be coupled in series electrical connection between an AC power source 402 and an electrical lighting load 404 for controlling the amount of power delivered to the lighting load. The dimmer switch 410 comprises a faceplate 412 and a bezel 413 received in an opening of the faceplate. The dimmer switch 410 further comprises a toggle actuator 414, i.e., a button, and an intensity adjustment actuator 416. Actuations of the toggle actuator 414 toggle, i.e., alternately turn off and on, the lighting load 404. Actuations of an upper portion 416A or a lower portion 416B of the intensity adjustment actuator 416 respectively increase or decrease the amount of power delivered to the lighting load 404 and thus increase or decrease the intensity of the lighting load 404. A plurality of status indicators 418, e.g., light-emitting diodes (LEDs), are arranged in a linear array on the left side of the bezel 413. The status indicators 418 are illuminated to provide feedback of the intensity of the lighting load 404. An example of a dimmer switch having a toggle actuator 414 and an intensity adjustment actuator 416 is described in greater detail in U.S. Pat. No. 5,248,919, issued Sep. 29, 1993, entitled LIGHTING CONTROL DEVICE, the entire disclosure of which is hereby incorporated by reference.

The remote control 420 comprises a plurality of actuators: an on button 422, a preset button 424, and an off button 426. The remote control 420 transmits messages via RF signals 406 to the dimmer switch 410 in response to actuations of the on button 422, the preset button 424, and the off button 426. Preferably, a message transmitted by the remote control 420 includes a serial number associated with the remote control and a command (e.g., on, off, or preset). During a setup procedure of the RF lighting control system 400, the dimmer switch 410 is associated with one or more remote controls 420. The dimmer switch 410 is then responsive to messages containing the serial number of the remote control 420 to which the dimmer switch is associated. The dimmer switch 410 is operable to turn on and to turn off the lighting load 404 in response to an actuation of the on button 422 and the off button 426, respectively. The dimmer switch 410 is operable to control the lighting load 404 to a preset intensity level in response to an actuation of the preset button 424.

FIG. 12A is a simplified block diagram of the dimmer switch 410. The dimmer switch 410 comprises a controllably conductive device 510 coupled in series electrical connection between the AC power source 402 and the lighting load 404 for control of the power delivered to the lighting load. The controllably conductive device 510 may comprise any suitable type of bidirectional switch, such as, for example, a triac, a field-effect transistor (FET) in a rectifier bridge, or two FETs in anti-series connection. The controllably conductive device 510 includes a control input coupled to a drive circuit 512. The input to the control input renders the controllably conductive device 510 conductive or non-conductive, which in turn controls the power supplied to the lighting load 404.

The drive circuit 512 provides control inputs to the controllably conductive device 510 in response to command signals from a controller 514. The controller 514 is preferably implemented as a microcontroller, but may be any suitable processing device, such as a programmable logic device (PLD), a microprocessor, or an application specific integrated circuit (ASIC). The controller 514 receives inputs from the toggle actuator 414 and the intensity adjustment actuator 416 and controls the status indicators 418. The controller 514 is also coupled to a memory 516 for storage of the preset intensity of lighting load 404 and the serial number of the remote control 420 to which the dimmer switch 410 is associated. A power supply 518 generates a direct-current (DC) voltage V_(CC) for powering the controller 514, the memory 516, and other low-voltage circuitry of the dimmer switch 410.

A zero-crossing detector 520 determines the zero-crossings of the input AC waveform from the AC power supply 402. A zero-crossing is defined as the time at which the AC supply voltage transitions from positive to negative polarity, or from negative to positive polarity, at the beginning of each half-cycle. The zero-crossing information is provided as an input to controller 514. The controller 514 provides the control inputs to the drive circuit 512 to operate the controllably conductive device 510 (i.e., to provide voltage from the AC power supply 402 to the lighting load 404) at predetermined times relative to the zero-crossing points of the AC waveform.

The dimmer switch 410 further comprises an RF receiver 522 and an antenna 524 for receiving the RF signals 406 from the remote control 420. The controller 514 is operable to control the controllably conductive device 510 in response to the messages received via the RF signals 406. Examples of the antenna 524 for wall-mounted dimmer switches, such as the dimmer switch 410, are described in greater detail in U.S. Pat. No. 5,982,103, issued Nov. 9, 1999, and U.S. patent application Ser. No. 10/873,033, filed Jun. 21, 2006, both entitled COMPACT RADIO FREQUENCY TRANSMITTING AND RECEIVING ANTENNA AND CONTROL DEVICE EMPLOYING SAME. The entire disclosures of both are hereby incorporated by reference.

FIG. 12B is a simplified block diagram of the remote control 420. The remote control 420 comprises a controller 530, which is operable to receive inputs from the on button 422, the preset button 424, and the off button 426. The remote control 420 further comprises a memory 532 for storage of the serial number, i.e., a unique identifier, of the remote control. Preferably, the serial number comprises a seven-byte number that is programmed into the memory 532 during manufacture of the remote control 420. A battery 534 provides a DC voltage V_(BATT) for powering the controller 530, the memory 532, and other low-voltage circuitry of the remote control 420.

The remote control 420 further includes an RF transmitter 536 coupled to the controller 530 and an antenna 538, which may comprise, for example, a loop antenna. In response to an actuation of one of the on button 422, the preset button 424, and the off button 426, the controller 530 causes the RF transmitter 536 to transmit a message to the dimmer switch 410 via the RF signals 406. Each transmitted message comprises the serial number of the remote control 420, which is stored in the memory 532, and a command indicative as to which of the three buttons was pressed (i.e., on, off, or preset).

The lighting control system 400 provides a simple one-step configuration procedure for associating the remote control 420 with the dimmer switch 410. A user simultaneously presses and holds the on button 422 on the remote control 420 and the toggle button 414 on the dimmer switch 410 to link the remote control 420 and the dimmer switch 410. The user may simultaneously press and hold the off button 426 on the remote control 420 and the toggle button 414 on the dimmer switch 410 to unassociate the remote control 420 with the dimmer switch 410. Further, the user may simultaneously press and hold the preset button 424 on the remote control 420 and the toggle button 414 on the dimmer switch 410 to store the present intensity of the lighting load 404 as the preset intensity level. The configuration procedure of the RF lighting control system 400 is described in greater detail in co-pending commonly-assigned U.S. patent application Ser. No. 11/559,166, filed Nov. 13, 2006, entitled RADIO-FREQUENCY LIGHTING CONTROL SYSTEM, the entire disclosure of which is hereby incorporated by reference.

FIG. 13 is a flowchart of a button procedure 600 executed by the controller 530 of the remote control 420. The button procedure 600 is preferably executed when one of the buttons 422, 424, 426 is pressed at step 610. First, the serial number of the remote control 420 is retrieved from the memory 532 at step 612, such that the serial number can be transmitted in the message to the dimmer switch 410. If the on button 422 is pressed at step 614, an on message is transmitted, i.e., the message is transmitted with an on command, at step 616 and the procedure 600 exits at step 626. Similarly, if the preset button is pressed at step 618 or the off button is pressed at step 622, a preset message is transmitted at step 620 or an off message is transmitted at step 624, respectively, before the procedure 600 exits at step 626.

FIG. 14 is a flowchart of an RF signal procedure 700 executed by the controller 514 of the dimmer switch 410. The RF signal procedure 700 is timer-driven, i.e., the procedure is executed periodically, e.g., every 40 tsec, in response to a timer of the controller 514 at step 702. The controller 514 first samples the data from the RF receiver 522, i.e., the received RF signal, at step 704, and then applies the sampled data to a first median filter 706A. The output sample of the first median filter 706A is provided as in the input sample of a second median filter 706B. The first and second median filters 706A, 706B may comprise any of the embodiments of the median filters 220A, 220B, 220C shown in FIGS. 9D-9F. The first and second median filters 706A, 706B form, in combination, a multi-pass median filter 706.

At step 708, the controller 514 stores the output sample of the second median filter 706B in the memory 516, i.e., to form a median-filtered output signal. Next, the controller 514 decodes the samples that are stored in the memory 516 (i.e., the median-filtered output signal) to determine if the samples represent a bit of data at step 710. For example, if the received signal is encoded using Manchester encoding, the controller determines at step 708 whether the received signal is transitioning from a high state to a low state, or vice versa, to represent a logic-zero bit or a logic-one bit, respectively. Any bits determined at step 708 are stored in the memory 516 at step 712. A determination is made at step 714 as to whether the controller 514 has collected K bits, i.e., the number of bits corresponding to a complete message. If the controller 514 has not collected K bits (e.g., 74 bits), the procedure 700 simply exits at step 730.

If the controller 514 has received a complete message of K bits at step 714, but the serial number contained in the received message is not stored in the memory 532 at step 716, the procedure 700 exits at step 730. If the serial number contained in the received message is stored in the memory 532 at step 716, a determination is made as to what type of command has been received at steps 718, 722, and 726. If an on message is received at step 718, the lighting load 404 is turned on to full intensity at step 720 and the procedure 700 exits at step 730. If a preset message is received at step 722, the lighting load 404 is turned on to the preset intensity level at step 724 and the procedure 700 exits at step 730. If an off message is received at step 726, the lighting load 404 is turned off at step 728 and the procedure 700 exits at step 730.

Use of the multi-pass median filter 706 by the controller 514 of the dimmer switch 410 of the RF lighting control system 400 has resulted in an increased performance over prior art RF lighting control systems that have not included the median filter. Specifically, the dimmer switch 410 using the multi-pass median filter 706 has been determined to have a 3 dB increase in the conducted RF sensitivity in comparison to a prior art dimmer switch not using the median filter.

The conducted RF sensitivity of the dimmer switch 410 and a prior art dimmer switch was measured using a test setup 440 as shown in FIG. 15. The dimmer switch 410 along with the AC source 402 and the lighting load 404 were placed in a Faraday cage 442, i.e., a shielded enclosure formed by conductive material. A transmitter 444 was located outside the Faraday cage 442 and transmitted a predetermined number of complete messages, e.g., 50 messages, to the dimmer switch 410 through an adjustable attenuator 446 and a coaxial cable 448. The coaxial cable 448 was connected directly to the input of the RF receiver 522 in place of the antenna 524. The controller 514 counted the number of complete messages received from the transmitter 444 at different values of attenuation of the adjustable attenuator 446. For example, when the adjustable attenuator 446 was set such that the power at the input of the RF receiver 522 was −110 dBm, the dimmer switch 410 according to the present invention received approximately 50% of the transmitted messages. In contrast, the prior art dimmer received substantially the same number of messages, i.e., approximately 50% of the messages, when the adjustable attenuator 446 was set such that the power at the input of the RF receiver was −107 dBm.

FIG. 16 is a simplified block diagram of an infrared (IR) lighting control system 800 according to the present invention. The lighting control system 800 comprises an IR dimmer switch 810 and an infrared (IR) remote control 820. The IR dimmer switch 810 is operable to receive IR signals 806 transmitted from the IR remote control 820. The IR dimmer switch 810 comprises an IR lens 830 to focus the IR signals 806 to an IR receiver (not shown) inside the IR dimmer switch 810. The IR remote control 820 includes a toggle actuator 822 and an intensity adjustment actuator 824. The IR remote control 820 is operable to transmit the IR signals 806 to the IR dimmer switch 810 via an IR transmitter 840, i.e., an IR diode, in response to actuations of the toggle actuator 822 and the intensity adjustment actuator 824. The IR dimmer switch 810 is operable to turn the lighting load 404 on and off in response to actuations of the toggle actuator 822 and to adjust the intensity of the lighting load in response to actuations of the intensity adjustment actuator 824. One skilled in the art would recognize that the IR dimmer switch 810 and the IR remote control 820 have similar block diagrams as the RF dimmer switch 410 and the RF remote control 420, shown in FIGS. 12A and 12B, respectively. An example of an IR lighting control system is described in greater detail in commonly-assigned U.S. Pat. No. 6,300,727, issued Oct. 9, 2001, entitled LIGHTING CONTROL WITH WIRELESS REMOTE CONTROL AND PROGRAMMABILITY, the entire disclosure of which is hereby incorporated by reference.

The IR dimmer switch 810 implements the multi-pass median filter 706 in an IR signal procedure (not shown) in a similar fashion as the RF signal procedure 700 shown in FIG. 14. It has been determined that the use of the multi-pass median filter 706 by the IR dimmer switch 810 has increased the range of the IR remote control 820 by approximately 15 feet. The range is defined as the maximum distance between the IR remote control 820 and the IR dimmer switch at which the IR dimmer switch is responsive to the IR signals 806 transmitted by the IR remote control 820. The range was measured using the IR dimmer switch 810 of the present invention and a prior art IR dimmer switch, with the IR signals 806 transmitted directly at the IR dimmer switches (i.e., perpendicular to the front surface of the IR dimmer switches). The dimmer switch 810 (using the multi-pass median filter 706 according to the present invention) was responsive to the IR signals 806 transmitted by the IR remote control 820 at a maximum of approximately 82 feet from the dimmer switch 810. In distinction, the prior art dimmer switch (which did not use the multi-pass median filter 706) was responsive to the IR signals 806 transmitted by the IR remote control 820 at a maximum of approximately 67 feet from the prior art dimmer switch.

Although the words “device” and “unit” have been used to describe the elements of the systems for control of lights and fan motors of the present invention, it should be noted that each “device” and “unit” described herein need not be fully contained in a single enclosure or structure. For example, the light/motor control unit 105 may comprise a controller in a wall-mounted device and fan motor control circuit in a separate location, e.g., in the canopy of the fan motor and the lamp. Also, one “device” may be contained in another “device”.

Although the present invention has been described in relation to particular embodiments thereof, many other variations and modifications and other uses will become apparent to those skilled in the art. Therefore, the present invention should be limited not by the specific disclosure herein, but only by the appended claims. 

1. A method of communicating a message signal from a first control device to a second control device, the method comprising the steps of: transmitting the message signal from the first control device; receiving the message signal at the second control device; sampling the received message signal; producing a set of N sequential samples; determining the median of the N sequential samples; and providing the median as an output sample.
 2. The method of claim 1, wherein the step of sampling the received message signal further comprises the steps of: producing a sample of one if the received message signal is at a high state; and producing a sample of zero if the received message signal is at a low state.
 3. The method of claim 2, wherein the step of determining the median of the N sequential samples further comprises steps of: grouping the one-samples and the zero-samples to form a sorted sample stream; and selecting the middle sample of the sorted sample stream as the median of the N sequential samples.
 4. The method of claim 2, wherein the step of determining the median of the N sequential samples further comprise steps of: counting the number of one-samples in the set of N sequential samples. determining if the number of one-samples is greater than or equal to (N+1)/2; setting the median of the N sequential samples as one if the number of one-samples is greater than or equal to (N+1)/2; and setting the median of the N sequential samples as zero if the number of one-samples is no greater than or equal to (N+1)/2.
 5. The method of claim 2, wherein the step of determining the median of the N sequential samples further comprises step of: determining the median of the N sequential samples from a lookup table.
 6. The method of claim 1, wherein the step of sampling the received message signal further comprises the step of sampling the received message signal to produce a new input sample.
 7. The method of claim 6, wherein the step of producing a set of N sequential samples comprises the steps of: discarding one of the set of N sequential samples; shifting the N sequential samples; and adding the new input sample to the set of N sequential samples to produce a new set of N sequential samples.
 8. The method of claim 1, further comprising the step of: repeating the steps of sampling the received message signal, producing a set of N sequential samples, determining the median, and providing the median.
 9. The method of claim 8, wherein the producing a set of N sequential samples comprises the steps of: discarding one of the set of N sequential samples; shifting the N sequential samples; and adding the output sample to the set of N sequential samples to produce a new set of N sequential samples.
 10. The method of claim 1, wherein the message signal comprises a current-carrier signal.
 11. The method of claim 1, wherein the message signal comprises a radio-frequency signal.
 12. The method of claim 1, wherein the message signal comprises an infrared signal.
 13. A method of filtering a received message signal comprising a sequence of samples, the method comprising the steps of: examining a set of N sequential samples of the received message signal; determining the median of the N sequential samples; providing the median as an output sample; and repeating the steps of examining a set of N sequential samples, determining the median, and providing the median.
 14. The method of claim 13, further wherein the step of repeating further comprises examining a new set of N sequential samples of the received message signal; wherein the new set of N sequential samples is determined by discarding the Nth sample of the N sequential samples and shifting the sequence of samples of the received message signal.
 15. A control device for use in a load control system for controlling the amount of power delivered to an electrical load from an AC power source, the control device comprising: a receiver operable to receive a message signal; a controller coupled to the receiver, the controller operable to: sample the received message signal to produce a sampled signal; execute a median filter on the sampled signal to produce a median-filtered output signal; and process the median-filtered output signal.
 16. The control device of claim 15, wherein the median filter comprises a multi-pass median filter.
 17. The control device of claim 16, wherein the multi-pass median filter comprises two single-pass median filters.
 18. The control device of claim 15, wherein the controller is operable to repeatedly: sample the received message signal to produce a sampled signal; examine a set of N sequential samples of the sampled signal; and determine the median of the N sequential samples.
 19. The control device of claim 15, further comprising: a memory coupled to the controller; wherein the controller is operable to store the median of the N sequential samples in the memory prior to processing the received message signal.
 20. The control device of claim 15, further comprising: a controllably conductive device adapted to be coupled in series electrical connection between the AC power source and the electrical load for controlling the amount of power delivered to the electrical load, the controllably conductive device comprising a control input coupled to the controller; wherein the controller is operable to control the controllably conductive device in response to the received message signal.
 21. The control device of claim 15, wherein the receiver comprises an RF receiver operable to receive an RF message signal.
 22. The control device of claim 15, wherein the receiver comprises an IR receiver operable to receive an IR message signal.
 23. The control device of claim 15, further comprising: a current responsive element coupled in series electrical connection between the AC source and the electrical load, the current responsive element coupled to the receiver, such that the receiver is operable to receive a current-carrier signal.
 24. The control device of claim 15, wherein the receiver comprises a transceiver for transmitting and receiving message signals.
 25. A load control system for controlling the amount of power delivered to an electrical load from an AC power source, the control device comprising: a first control device including a transmitter operable to transmit a message signal; and a second control device including a receiver operable to receive a message signal and a controller coupled to the receiver, the controller operable to sample the received message signal to produce a sampled signal, execute a median filter on the sampled signal to produce a median-filtered output signal, and process the median-filtered output signal.
 26. The load control system of claim 25, wherein the median filter comprises a multi-pass median filter.
 27. The load control system of claim 25, wherein the controller is operable to repeatedly sample the received message signal, examine a set of N sequential samples of the received message signal, determine the median of the N sequential samples, and process the received message signal using the median.
 28. The load control system of claim 25, wherein the second load control device further comprises a controllably conductive device adapted to be coupled in series electrical connection between the AC power source and the electrical load for controlling the amount of power delivered to the electrical load, the controller operable to control the controllably conductive device. 